#include "scm.h"

typedef enum {
  bltn_gensym = 1,
  bltn_display = 2,
  bltn_newline = 3,
  
  bltn_eq = 5,

  bltn_cons = 7,
  bltn_car = 8,
  bltn_cdr = 9,
  bltn_set_car = 10,
  bltn_set_cdr = 11,
  
  bltn_nullq = 12,
  bltn_pairq = 13,
  bltn_numberq = 14,
  bltn_booleanq = 15,
  bltn_stringq = 16,
  bltn_charq = 17,
  bltn_symbolq = 18,

  bltn_add = 19,
  bltn_subtract = 20,
  bltn_multiply = 21,
  bltn_eql = 22,
  bltn_lt = 23,
  bltn_gt = 24,
  bltn_le = 25,
  bltn_ge = 26,
  
  bltn_quotient = 27,
  bltn_modulo = 28,

  bltn_vector_ref = 33,
  bltn_vector_set_bang = 34,
  bltn_make_vector = 35,
  bltn_vector_length = 36,

  bltn_make_string = 37,
  bltn_string_set_bang = 38,
  bltn_string_ref = 39,
  bltn_string_to_symbol = 40,
  bltn_string_length = 41,
  bltn_string_eql = 42,
  
  bltn_eof_objectq = 43,
  bltn_read_char = 44,
  bltn_peek_char = 45,
  
  bltn_vectorq = 46,
  bltn_symbol_to_string = 47,
  bltn_char_to_integer = 48,

  bltn_max = 50,
} builtin;

typedef scm (*builtin_handler)();
extern builtin_handler handler[bltn_max];

void scm_display(scm x);
